package org.qydjk.common.pojo;

import javax.persistence.*;

@Entity
@Table(name = "qy_company", schema = "qydjk", catalog = "")
public class Company {
    private Integer id;
    private String name;
    private Integer type;
    private String logo;
    private String telephone;
    private String url;
    private String address;
    private Integer provinc;
    private Integer city;
    private Integer districk;
    private String linkman;
    private Integer sex;
    private String phone;
    private String email;
    private Integer userId;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "type")
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Basic
    @Column(name = "logo")
    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    @Basic
    @Column(name = "telephone")
    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    @Basic
    @Column(name = "url")
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Basic
    @Column(name = "address")
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Basic
    @Column(name = "provinc")
    public Integer getProvinc() {
        return provinc;
    }

    public void setProvinc(Integer provinc) {
        this.provinc = provinc;
    }

    @Basic
    @Column(name = "city")
    public Integer getCity() {
        return city;
    }

    public void setCity(Integer city) {
        this.city = city;
    }

    @Basic
    @Column(name = "districk")
    public Integer getDistrick() {
        return districk;
    }

    public void setDistrick(Integer districk) {
        this.districk = districk;
    }

    @Basic
    @Column(name = "linkman")
    public String getLinkman() {
        return linkman;
    }

    public void setLinkman(String linkman) {
        this.linkman = linkman;
    }

    @Basic
    @Column(name = "sex")
    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    @Basic
    @Column(name = "phone")
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Basic
    @Column(name = "email")
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Basic
    @Column(name = "user_id")
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Company company = (Company) o;

        if (id != null ? !id.equals(company.id) : company.id != null) return false;
        if (name != null ? !name.equals(company.name) : company.name != null) return false;
        if (type != null ? !type.equals(company.type) : company.type != null) return false;
        if (logo != null ? !logo.equals(company.logo) : company.logo != null) return false;
        if (telephone != null ? !telephone.equals(company.telephone) : company.telephone != null) return false;
        if (url != null ? !url.equals(company.url) : company.url != null) return false;
        if (address != null ? !address.equals(company.address) : company.address != null) return false;
        if (provinc != null ? !provinc.equals(company.provinc) : company.provinc != null) return false;
        if (city != null ? !city.equals(company.city) : company.city != null) return false;
        if (districk != null ? !districk.equals(company.districk) : company.districk != null) return false;
        if (linkman != null ? !linkman.equals(company.linkman) : company.linkman != null) return false;
        if (sex != null ? !sex.equals(company.sex) : company.sex != null) return false;
        if (phone != null ? !phone.equals(company.phone) : company.phone != null) return false;
        if (email != null ? !email.equals(company.email) : company.email != null) return false;
        if (userId != null ? !userId.equals(company.userId) : company.userId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (logo != null ? logo.hashCode() : 0);
        result = 31 * result + (telephone != null ? telephone.hashCode() : 0);
        result = 31 * result + (url != null ? url.hashCode() : 0);
        result = 31 * result + (address != null ? address.hashCode() : 0);
        result = 31 * result + (provinc != null ? provinc.hashCode() : 0);
        result = 31 * result + (city != null ? city.hashCode() : 0);
        result = 31 * result + (districk != null ? districk.hashCode() : 0);
        result = 31 * result + (linkman != null ? linkman.hashCode() : 0);
        result = 31 * result + (sex != null ? sex.hashCode() : 0);
        result = 31 * result + (phone != null ? phone.hashCode() : 0);
        result = 31 * result + (email != null ? email.hashCode() : 0);
        result = 31 * result + (userId != null ? userId.hashCode() : 0);
        return result;
    }
}
